package com.axjy.redis01.controller;

import com.axjy.redis01.pojo.TpArea;
import com.axjy.redis01.service.AreaService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class AreaController {

    @Resource
    private AreaService areaService;

    @GetMapping("/area/query")
    public List<TpArea> query(int level){
        return  areaService.searchArea(level);
    }

    @GetMapping("/area/getUuid")
    public String getUuid(){
        return areaService.createUUID();
    }

}
